Run ReadingListSyncAdapter as expedited work#5063
Run ReadingListSyncAdapter as expedited work#5063Isira-Seneviratne wants to merge 21 commits intowikimedia:mainfrom
Conversation
81e81cb to
f150815
Compare
|
Thanks for the PR! Not sure but I don't see the notification when I start or login the app. Does this work for manually syncing the list? |
|
That might be due to how foreground notifications work on Android 12 and later: "Devices that run Android 12 (API level 31) or higher provide a streamlined experience for short-running foreground services. On these devices, the system waits 10 seconds before showing the notification associated with a foreground service." I'll update the PR to change the behavior. |
Thanks. I am still not seeing the notification. My device is Samsung S24 with Android 14. |
|
It might be because the syncing is usually too fast to show the notification on newer Android versions. I set a breakpoint for the update foreground info method on my Pixel 8 with Android 15 and the notification appeared. |
What does this do?
This PR updates the reading list sync worker to run as expedited work.
Why is this needed?
With this change, WorkManager configures the worker to start execution immediately. It also provides APIs to create/update the work notification.
Demo
Screen_recording_20241026_083731.webm
Android 5.0